import random
import time  

def sort(l:list):
    length = len(l)
    for i in range(1, length):
        for j in range(i, 0, -1):
            if l[j] >= l[j - 1]:
                break              
            else:
                l[j], l[j - 1] = l[j - 1], l[j]

if __name__ == "__main__":

    l = [random.randint(0,5000) for _ in range(5000)]
    before = time.time()
    sort(l)
    after = time.time()
    print(after - before)   
